function chans= util_scalpChannels(clab)
%UTIL_SCALPCHANNELS - Indices of scalp channels
%
%LABEL_LIST= util_scalpChannels
% or
%CHAN_IDX= util_scalpChannels(CLAB)
%CHAN_IDX= util_scalpChannels(DAT)
%
% Output:
% LABEL_LIST is a list of electrode positions on the scalp
%    (extended 10/10 system).
% CHAN_IDX is the set of indices to CLAB (resp (DAT.clab) that
%    are scalp positions.

label_list= {'Fp1','Fpz','Fp2', 'AFp1','AFp2', ...
'AF7','AF5','AF3','AF1','AFz','AF2','AF4','AF6','AF8', ...
'FAF7','FAF5','FAF3','FAF1','FAF2','FAF4','FAF6','FAF8', ...
'F9','F7','F5','F3','F1','Fz','F2','F4','F6','F8','F10', ...
'FFC9','FFC7','FFC5','FFC3','FFC1','FFC2','FFC4','FFC6','FFC8','FFC10', ...
'FT9','FT7','FC5','FC3','FC1','FCz','FC2','FC4','FC6','FT8','FT10', ...
'CFC9','CFC7','CFC5','CFC3','CFC1','CFC2','CFC4','CFC6','CFC8','CFC10', ...
'T9','T7','C5','C3','C1','Cz','C2','C4','C6','T8','T10', ...
'CCP7','CCP5','CCP3','CCP1','CCP2','CCP4','CCP6','CCP8', ...
'TP9','TP7','CP5','CP3','CP1','CPz','CP2','CP4','CP6','TP8','TP10', ...
'PCP9','PCP7','PCP5','PCP3','PCP1','PCP2','PCP4','PCP6','PCP8','PCP10', ...
'P9','P7','P5','P3','P1','Pz','P2','P4','P6','P8','P10', ...
'PPO9','PPO7','PPO5','PPO3','PPO1','PPO2','PPO4','PPO6','PPO8','PPO10', ...
'PO9','PO7','PO5','PO3','PO1','POz','PO2','PO4','PO6','PO8','PO10', ...
'OPO1','OPO2','O9','O1','Oz','O2','O10','OI1','OI2','I1','Iz','I2', ...
'A1','A2'};

if nargin==0,
  chans= label_list;
else
%  w_cm= warning('query', 'bci:missing_channels');
%  warning('off', 'bci:missing_channels');
  chans= util_chanind(clab, label_list);
%  warning(w_cm);
end
